import requests

from  util.ip import get_proxies



proxies = get_proxies()
url = "https://httpbin.org/get?age=10"
i = 0
while True:
    try:
        response = requests.get(url, proxies=proxies)
        print(response.json())
        i += 1
        if i == 10:
            break
    except OSError as e:
        print("代理失效", e)